package com.openbravo.pos.util;

import java.io.UnsupportedEncodingException;
import org.apache.commons.codec.binary.Base64;

public class Base64Encoder
{
  public static byte[] decode(String paramString)
  {
    try
    {
      return Base64.decodeBase64(paramString.getBytes("ASCII"));
    }
    catch (UnsupportedEncodingException localUnsupportedEncodingException)
    {
    }
    return null;
  }

  public static String encode(byte[] paramArrayOfByte)
  {
    try
    {
      return new String(Base64.encodeBase64(paramArrayOfByte), "ASCII");
    }
    catch (UnsupportedEncodingException localUnsupportedEncodingException)
    {
    }
    return null;
  }

  public static String encodeChunked(byte[] paramArrayOfByte)
  {
    try
    {
      return new String(Base64.encodeBase64Chunked(paramArrayOfByte), "ASCII");
    }
    catch (UnsupportedEncodingException localUnsupportedEncodingException)
    {
    }
    return null;
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.pos.util.Base64Encoder
 * JD-Core Version:    0.6.0
 */